<template>
  <div class="cart-list">
    <Scroll class="content" :probeType="3" ref="scroll">
      <CartListItem
        v-for="(item, index) in cartList"
        :key="index"
        :item-info="item"
      ></CartListItem>
    </Scroll>
  </div>
</template>

<script>
import Scroll from "../../../components/common/scroll/Scroll";
import CartListItem from "./CartListItem";
export default {
  name: "CartList",
  components: {
    Scroll,
    CartListItem,
  },
  computed: {
    cartList() {
      return this.$store.state.cartList;
    },
  },
  activated() {
    this.$refs.scroll.refresh();
  },
};
</script>

<style scoped>
.cart-list {
  height: 100vh;
}
.content {
  overflow: hidden;
  margin-top: 44px;
  height: calc(100% - 133px);
}
</style>